

# UseRequestEventsPropsType

<div class="api-docs__separator" data-reactroot="">

---

</div><div class="api-docs__import" data-reactroot="">

```ts
import { UseRequestEventsPropsType } from "@hyper-fetch/react"
```

</div><div class="api-docs__section">

## Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">



</span></div><p class="api-docs__definition">

Defined in [react/src/helpers/use-request-events/use-request-events.types.ts:21](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/react/src/helpers/use-request-events/use-request-events.types.ts#L21)

</p><div class="api-docs__section">

## Preview

</div><div class="api-docs__preview type">

```ts
type UseRequestEventsPropsType<T> = {
  actions: UseTrackedStateActions<T>; 
  dispatcher: Dispatcher; 
  logger: LoggerType; 
  request: T; 
  setCacheData: (cacheData: CacheValueType<ExtractResponseType<T>, ExtractErrorType<T>>) => void; 
}
```

</div><div class="api-docs__section">

## Structure

</div><div class="api-docs__returns">

```ts
{
  actions: {
    setData: (data: ExtractResponseType<T>, emitToCache?: boolean) => void;
    setError: (error: ExtractErrorType<T>, emitToCache?: boolean) => void;
    setExtra: (extra: ExtractAdapterExtraType<ExtractAdapterType<T>>, emitToCache?: boolean) => void;
    setLoading: (loading: boolean, emitToHooks?: boolean) => void;
    setRetries: (retries: number, emitToCache?: boolean) => void;
    setStatus: (status: ExtractAdapterStatusType<ExtractAdapterType<T>>, emitToCache?: boolean) => void;
    setSuccess: (success: boolean, emitToCache?: boolean) => void;
    setTimestamp: (timestamp: Date, emitToCache?: boolean) => void;
  };
  dispatcher: Dispatcher;
  logger: Record<LoggerLevelType, (message: LoggerMessageType, ...extra: LoggerMessageType[]) => void>;
  request: T;
  setCacheData: (cacheData: CacheValueType<ExtractResponseType<T>, ExtractErrorType<T>>) => void;
}
```

</div>